package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketOrder;
import com.cskaoyan.bean.MarketOrderExample;
import com.cskaoyan.bean.bo.StatOrderBo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketOrderMapper {
    long countByExample(MarketOrderExample example);

    int deleteByExample(MarketOrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketOrder record);

    int insertSelective(MarketOrder record);

    List<MarketOrder> selectByExample(MarketOrderExample example);

    MarketOrder selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketOrder record, @Param("example") MarketOrderExample example);

    int updateByExample(@Param("record") MarketOrder record, @Param("example") MarketOrderExample example);

    int updateByPrimaryKeySelective(MarketOrder record);

    int updateByPrimaryKey(MarketOrder record);

    Integer selectCount();

    List<StatOrderBo> selectOrderByDate();

    /**
     * 通过快递公司的名字查其代码值
     *
     * @param expCode
     * @return java.lang.String
     * @author LA
     * @since 2023/01/02 14:40
     */
    String selectExpNoByName(String expCode);

    Integer selectOrderStatusByUserId(@Param("id") Integer userId, @Param("name") String name, @Param("status") Integer status);

    Integer selectOrderGoodsByUserId(@Param("id") Integer userId);

    /**
     * 获取当前最大的orderSn
     *
     * @return long
     * @author LA
     * @since 2023/01/03 2:04
     */
    Long selectMaxOrderSn();
}